It is common in the data processing industry to validate computer addresses, the value of variables, and such, before using the values to perform computer operations. There are many reasons to categorize variables, ranging from validity checking to usage counting. In the case of validity checking, such validation before use can avoid unnecessary interference with the orderly operation of data processing systems and computers.
It is known to perform simple range checks on the contents of variables in which all character positions of a variable have the same attributes, such as base 10 digits, (e.g. 100–999), or hexadecimal (e.g. 0000–FFFF). When variables can take on disjoint values, it is also known to perform simple range checks on each possible disjoint range. U.S. Pat. No. 4,692,897 and Laid Open Japanese application JP 2000020351A2 are examples of such prior art techniques.
However, such techniques can become burdensome and consume a disproportionate share of computer resources when there are many possible ranges. The problem becomes more complicated when the different character positions of a variable can have different attributes. For example, a system may use many variable ranges in which each position within a variable is characterized by different attributes (decimal referred to as numeric herein, alphanumeric, alphabetic, hexadecimal, fixed, etc.) In a real system, there can be hundreds or thousands of variable ranges to check. In some cases, all ranges must be checked to determine which ranges match the variable. In other cases, they must be checked at least until a match is found. There can be many reasons these checks are needed; updating of use-counts is a typical reason.
A system can define many variable ranges. Each variable range is defined by a start variable, an end variable, and the attribute of each character position in the variable. For example, a three character variable range can start with A10 and end with D8F. The first character is an alphabetic range, the second character is a numeric range, and the third character is a hexadecimal range. Shorthand notation of this range would be A10–D8F (Alpha,Numeric,Hex) where the characteristics of each position are defined within the parentheses. Character position 1 (A and D) is an Alphabetic range, character position 2 (1 and 8) is a numeric range, and character position 3 (0 and F) is a hexadecimal range.
The variable ranges may overlap or intersect each other.
For example, consider the following variable ranges:    C13 to C26 (Fixed,Num,Num)    C15 to C2C (Fixed,Num,Hex)    C17 to C2M (Fixed,Num,Alphanum)
It is important to realize how variables increment. It is clear that C13–C26 includes the variable C18. It is less obvious that C15–C2C includes the variable C1D or that C17–C2M includes the variable C1X.
As known in the prior art, it is relatively easy to determine if a variable value is within the start and end boundaries of a range. If there are many disjoint ranges in which all character positions of each range have the same attributes, it is relatively easy to check each range, but this quickly becomes too costly in terms of performance. When the character positions have different attributes, each character position can be checked individually, but that is extremely costly in terms of performance. The processing overhead increases as the length of the variable increases and the number of different character attributes increases. A method is needed to quickly determine if a variable value matches a range definition without checking each character individually.